@import '../../utils.less';

.ui-group-tree-component {
  display: flex;
  flex-direction: column;
  flex: 1;

  ul, li {
    list-style: none;
  }

  .search {
    flex: none;
    width: auto;
    margin: 0 20px;
    margin-bottom: 16px;
  }

  ul.search-result-list {
    padding: 0 20px;
    li {
      height: 28px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      border-radius: 4px;
      overflow: hidden;

      line-height: 28px;
      font-size:14px;
      font-weight:400;
      color: @color-2;

      &.active {
        font-weight:600;
        background: #2A2A2A;
      }

      &:not(.active) {
        &:not(.disabled) {
          &:hover {
            background: #2A2A2A;
          }
        }
      }

      span {
        margin-left: 6px;
      }
    }
  }

  .breadcrumb {
    margin-bottom: 10px;
    padding: 0 20px;
  }
}

.ui-group-tree-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
}

.ui-group-tree {
  position: relative;

  .ivu-tree-arrow {
    position: relative;
    z-index: 2;
    &-open {}
  }

  .ivu-tree-arrow i {
    font-size: 18px;
  }

  .ivu-icon-ios-arrow-forward {
    &:before {
      content: "\F341";
    }
  }

}

.ui-tree-item {
  display: inline-block;
  padding: 0 6px;

  height: 28px;
  line-height: 28px;
  font-size:14px;
  font-weight:400;
  color: @color-2;
  background: unset;

  &-bg {
    position: absolute;
    left: 0;
    width: 100%;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
  }

  &-title {
    display: inline-flex;

    > span {
      width: 160px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  &.active {
    font-weight:600;
    color: @color-1;

    .ui-tree-item-bg {
      background-color: @bg-3;
      cursor: pointer;
      opacity: 0.6;
    }
  }

  &:not(.active) {
    &:not(.disabled) {
      background: unset;

      .ui-tree-item-bg:hover {
        background-color: @bg-3;
        cursor: pointer;
        opacity: 0.6;
      }
    }
  }

  .icon {
    margin-right: 8px;
  }
}